﻿using System.Web.Mvc;
using Controller2.BLL;
using Controller2.Models;

namespace Controller2.Controllers
{
    [Authorize(Roles = "SysAdmin, Administrador, Gerente, DiretorArte")]
    public class RelatorioController : Controller
    {
        ControllerBDModelContainer db = new ControllerBDModelContainer();

        public ActionResult Index() // Index padrão
        {
            return View();
        }

        public ActionResult Brainstorms()
        {
            return View();
        }

        public ActionResult Campanhas()
        {
            return View();
        }

        public ActionResult Clientes()
        {            
            return View();
        }
        
        public ActionResult Entradas()
        {
            return View();
        }

        public ActionResult Jobs()
        {
            return View();
        }

        public ActionResult Saidas() 
        {
            return View();
        }

        [HttpGet]
        public ActionResult PesquisarTopicos(string termo)
        {
            var t = BrainstormBll.PesquisarPorTopico(db, termo);
            return Json(t, JsonRequestBehavior.AllowGet);
        }
    }
}
